#include "CustomCheckBox.h"
#include <QPainter>

CustomCheckBox::CustomCheckBox(QWidget *parent)
    : QCheckBox(parent),
    uncheckedPixmap(":/select_1.png"),
    checkedPixmap(":/selected.png") {
    setFixedSize(uncheckedPixmap.size());
}

void CustomCheckBox::paintEvent(QPaintEvent *event) {
    QPainter painter(this);
    if (isChecked()) {
        painter.drawPixmap(0, 0, checkedPixmap);
    } else {
        painter.drawPixmap(0, 0, uncheckedPixmap);
    }
}
